<h1>Тоглогчид</h1>

<?php echo link_to('жагсаалт', 'player/index', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('шинээр нэмэх', 'player/new', array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<table width="100%">
  <thead>
    <tr>
      <th>#</th>
      <th>Зураг</th>
      <th>Нэр</th>
      <th>Овог</th>
      <th>Хоч</th>
      <th>Тухай</th>
      <th>Байрлал</th>
      <th>Баг</th>
	  <th></th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($pager->getResults() as $bb_players): ?>
    <tr>
      <td><?php echo $bb_players->getNumber() ?></td>
      <td><?php echo image_tag('/uploads/player/'.$bb_players->getDefImg(), array('style'=>'max-width:200px;max-height:150px;')) ?></td>      
      <td><?php echo $bb_players->getFirstName() ?></td>
      <td><?php echo $bb_players->getLastName() ?></td>
      <td><?php echo $bb_players->getNick() ?></td>
      <td><?php echo $bb_players->getAbout() ?></td>
      <td><?php echo $bb_players->getBbPositions() ?></td>      
      <td><?php echo $bb_players->getBbTeams() ?></td>
	  <td nowrap>
        <a href="<?php echo url_for('player/edit?id='.$bb_players->getId()) ?>">Засварлах</a><br><br>
        <a onclick="return confirm('Та итгэлтэй байна уу?')" href="<?php echo url_for('player/delete?id='.$bb_players->getId()) ?>">Устгах</a>
      </td>            
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

<?php echo pager($pager, 'player/index')?>

